package com.hos.db.entity.consult;

import com.hos.db.create.consult.ConsultImgsEntity;
import com.hos.db.entity.UserDocEntity;
import com.hos.db.entity.UserPatsEntity;
import com.hos.utile.JsonUtile;

import java.util.Date;
import java.util.List;

/**
 * 咨询
 * Created by guom on 2018/10/30.
 */
public class ConsultEntity {
    private String consultId;//咨询id
    private String consultTitle;//咨询标题
    private String consultContent;// 咨询内容
    private List<ConsultImgsEntity> consultImages;// 咨询图片
    private String consultPatId;//  医生id
    private String consultDocId;//  患者id
    private int consultState;//  咨询状态
    private Date consultCreateTime;// 消息创建时间
    private Date consultUpdateTime;// 消息创建时间

    private UserPatsEntity pat;
    private UserDocEntity doc;

    public String getConsultId() {
        return consultId;
    }

    public void setConsultId(String consultId) {
        this.consultId = consultId;
    }

    public String getConsultTitle() {
        return consultTitle;
    }

    public void setConsultTitle(String consultTitle) {
        this.consultTitle = consultTitle;
    }

    public String getConsultContent() {
        return consultContent;
    }

    public void setConsultContent(String consultContent) {
        this.consultContent = consultContent;
    }

    public List<ConsultImgsEntity> getConsultImages() {
        return consultImages;
    }

    public void setConsultImages(String images) {
        if (images == null || images == "") {
            return;
        }
        this.consultImages = (List<ConsultImgsEntity>) JsonUtile.json2Obj(images, List.class, ConsultImgsEntity.class);
    }

    public String getConsultPatId() {
        return consultPatId;
    }

    public void setConsultPatId(String consultPatId) {
        this.consultPatId = consultPatId;
    }

    public String getConsultDocId() {
        return consultDocId;
    }

    public void setConsultDocId(String consultDocId) {
        this.consultDocId = consultDocId;
    }

    public int getConsultState() {
        return consultState;
    }

    public void setConsultState(Integer consultState) {
        if (consultState == null) {
            consultState = 0;
        }
        this.consultState = consultState;
    }

    public Date getConsultCreateTime() {
        return consultCreateTime;
    }

    public void setConsultCreateTime(Date consultCreateTime) {
        this.consultCreateTime = consultCreateTime;
    }

    public UserPatsEntity getPat() {
        return pat;
    }

    public void setPat(UserPatsEntity pat) {
        this.pat = pat;
    }

    public UserDocEntity getDoc() {
        return doc;
    }

    public void setDoc(UserDocEntity doc) {
        this.doc = doc;
    }

    public Date getConsultUpdateTime() {
        return consultUpdateTime;
    }

    public void setConsultUpdateTime(Date consultUpdateTime) {
        this.consultUpdateTime = consultUpdateTime;
    }
}
